/*
 * @作者: 沙昊
 * @邮箱: shahao@zju.edu.cn
 * @功能: 
 * @包含算法: 
 * Copyright (c) 2023 by 沙昊, All Rights Reserved. 
 */
/*
 * @作者: 沙昊
 * @邮箱: shahao@zju.edu.cn
 * @功能: 
 * @包含算法: 
 * Copyright (c) 2023 by 沙昊, All Rights Reserved. 
 */
#include <iostream>
#include <sstream>
#include <string> 
#include <vector>
#include <queue>
#include <stack>


using namespace std;



void sort(vector<int>& nums){
    int len = nums.size();
    for(int i=len-1; i>0; i--){
        for(int j=0;j<i;j++){
            if(nums[j]>nums[j+1]){
            int temp = nums[j];
            nums[j] = nums[j+1];
            nums[j+1] = temp;
            }

        }
    }
}

int main(){
    int a[7] = {1,2,4,5,2,3,1};
    vector<int> nums(a,a+7);
    sort(nums);
    for(int a : nums){
        cout<<a<<endl;
    }

    return 0;
}